﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 计科2111林开心06
{
    public partial class _1_13 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            Button btn1 = new Button();
            btn1.ID = "btn1";
            
           
            PlaceHolder1.Controls.Add(btn1);
            btn1.Text = "确定";
            btn1.Click += Btn1_Click1;
           
           
        }

        private void Btn1_Click1(object sender, EventArgs e)
        {
            string str = "";
            for (int i = 0; i < CheckBoxList1.Items.Count; i++)
            {
                if (CheckBoxList1.Items[i].Selected)
                {
                    str += CheckBoxList1.Items[i].Value+",";
                }
            }
            Response.Write("您添加了"+str);
        }

    

        protected void CheckBoxList1_TextChanged(object sender, EventArgs e)
        {
           
            Button btn1 = (Button)PlaceHolder1.FindControl("btn1");
            
        
        }
    }
}